<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>传统分页效果</title>
    <style type="text/css">
        h2, div{
            width: 800px;
            margin: auto;
        }
        h2{
            text-align: center;
        }
    </style>

</head>
<body>
    <h2>分页效果</h2>
    <div id="result"></div>

    <script type="text/javascript">
        function showpage() {
            var xhr = new XMLHttpRequest();

            xhr.onreadystatechange = function () {
                if(xhr.readyState == 4){
                    document.getElementById("result").innerHTML = xhr.responseText;
                }
            }

            xhr.open('get','./01Page.php');
            xhr.send(null);
        }
        window.onload = function () {
            showpage();
        }
    </script>
</body>
</html>